package top.kaoshanji.r2ch07d;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * 代码清单-r2ch07d-232页c：实现一个前置增强
 * @author kaoshanji
 * ^_^
 * create time 2025/5/7 16:50
 */
public class GreetingBeforeAdvice implements MethodBeforeAdvice {

    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        String clientName = (String) args[0];

        System.out.println("欢迎光临！Mr." + clientName + "....");

    }
}
